package antrace;

public class GameoverOverlay extends Overlay {

	private long timer;
	
	public GameoverOverlay() {
		super(AntRace.midlet.loadImage("/images/gui/gameOver.png"));
		
		texts = new OverlayText[1];
		texts[0] = new OverlayText(" ",0,0);
		// no text!
	}
	
	public void setTimer(int time){
		timer = time;
	}
	
	public void draw(){
		AntRace.midlet.image(images[1],40,160);
		
		if(AntRace.getCentralTime() > (timer+30)){
			this.toggleVisible();
			AntRace.game.ingameMenu.toggleVisible();
		}
	}

}
